<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <title>Vue2</title>
  </head>
  <body>
    <div id="app">
      <ul>
        <li v-for="item in list">{{item}}</li>
      </ul>
      <button @click="changeLike">更改</button>
    </div>
  </body>

  <script>
    let app = new Vue({
      el: '#app',
      data () {
        return {
          msg: 'Hello',
          person: {
            like: {
              one: 'reading',
              two: 'running'
            }
          },
          list: [1, 2, 3, 4, 5]
        }
      },
      methods: {
        changeLike () {
          this.list[2] = 100
          console.log(this.list);
        }
      }
    })
  </script>
</html>
